/**
 * This file is part of the DbUnit module for NetBeans IDE
 * Copyright (C) 2009 Pavol Pitoňák
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 *
 */

package cz.muni.fi.dbunit;

import javax.swing.JPanel;
import org.openide.util.NbBundle;

/**
 *
 * @author Pavol Pitoňák <pavol@pitonak.com>
 */
public final class EmptyTestVisualPanel extends JPanel {

    public static final String TEST_INITIALIZER = "test_initializer";
    public static final String TEST_FINALIZER = "test_finalizer";
    public static final String SOURCE_CODE_HINTS = "source_code_hints";

    /** Creates new form EmptyTestVisualPanel */
    public EmptyTestVisualPanel() {
        initComponents();
    }

    @Override
    public String getName() {
        // it won't be used because it is part of another panel
        return "";
    }

    public boolean isTestInitializer() {
        return testInitializerCheckBox.isSelected();
    }

    public boolean isTestFinalizer() {
        return testFinalizerCheckBox.isSelected();
    }

    public boolean isSourceCodeHints() {
        return sourceCodeHintsCheckBox.isSelected();
    }

    public void setTestFinalizer(boolean arg) {
        testFinalizerCheckBox.setSelected(arg);
    }

    public void setTestInitializer(boolean arg) {
        testInitializerCheckBox.setSelected(arg);
    }

    public void setSourceCodeHints(boolean arg) {
        sourceCodeHintsCheckBox.setSelected(arg);
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        generatedCodeLabel = new javax.swing.JLabel();
        generatedCommentsLabel = new javax.swing.JLabel();
        testInitializerCheckBox = new javax.swing.JCheckBox();
        testFinalizerCheckBox = new javax.swing.JCheckBox();
        sourceCodeHintsCheckBox = new javax.swing.JCheckBox();

        org.openide.awt.Mnemonics.setLocalizedText(generatedCodeLabel, org.openide.util.NbBundle.getMessage(EmptyTestVisualPanel.class, "EmptyTestVisualPanel.generatedCodeLabel.text")); // NOI18N

        org.openide.awt.Mnemonics.setLocalizedText(generatedCommentsLabel, org.openide.util.NbBundle.getMessage(EmptyTestVisualPanel.class, "EmptyTestVisualPanel.generatedCommentsLabel.text")); // NOI18N

        testInitializerCheckBox.setSelected(true);
        org.openide.awt.Mnemonics.setLocalizedText(testInitializerCheckBox, org.openide.util.NbBundle.getMessage(EmptyTestVisualPanel.class, "EmptyTestVisualPanel.testInitializerCheckBox.text")); // NOI18N

        testFinalizerCheckBox.setSelected(true);
        org.openide.awt.Mnemonics.setLocalizedText(testFinalizerCheckBox, org.openide.util.NbBundle.getMessage(EmptyTestVisualPanel.class, "EmptyTestVisualPanel.testFinalizerCheckBox.text")); // NOI18N

        sourceCodeHintsCheckBox.setSelected(true);
        org.openide.awt.Mnemonics.setLocalizedText(sourceCodeHintsCheckBox, org.openide.util.NbBundle.getMessage(EmptyTestVisualPanel.class, "EmptyTestVisualPanel.sourceCodeHintsCheckBox.text")); // NOI18N

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
        this.setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(generatedCodeLabel)
                    .addGroup(layout.createSequentialGroup()
                        .addGap(12, 12, 12)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(testFinalizerCheckBox)
                            .addComponent(testInitializerCheckBox))))
                .addGap(35, 35, 35)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(generatedCommentsLabel)
                    .addGroup(layout.createSequentialGroup()
                        .addGap(12, 12, 12)
                        .addComponent(sourceCodeHintsCheckBox)))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(generatedCodeLabel)
                    .addComponent(generatedCommentsLabel))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(testInitializerCheckBox)
                    .addComponent(sourceCodeHintsCheckBox))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(testFinalizerCheckBox)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
    }// </editor-fold>//GEN-END:initComponents

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JLabel generatedCodeLabel;
    private javax.swing.JLabel generatedCommentsLabel;
    private javax.swing.JCheckBox sourceCodeHintsCheckBox;
    private javax.swing.JCheckBox testFinalizerCheckBox;
    private javax.swing.JCheckBox testInitializerCheckBox;
    // End of variables declaration//GEN-END:variables
}

